﻿/**************************************************
* 版权所有:Copyright (C) 
* 作    者:蔡海翔
* 创建日期:2014/6/18 8:54:01
* 描    述:物品表
* 修改日期:
* 修改内容:
****************************************************/

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DataEntity
{
    [Table("OffGoods")]
    public  class OffGoods:SysLogBaseField
    {
        [Key]
        public int ID { get; set; }

        [Display(Name = "物品名称")]
        [Required]
  
        public string Name { get; set; }

        [Display(Name="物品编码")]
        public string Code {get;set;}

        [Display(Name = "排序号")]
        public int SortNumber { get; set; }

        [Display(Name = "计量单位")]
        [Required]
        public string Unit { get; set; }

        [Display(Name = "物品描述")]
        public string Des { get; set; }

        [Display(Name = "单价")]
        public decimal AveragePerPrice { get; set; }

        [Display(Name = "税后单价")]
        public decimal AverageAfterTaxPrice { get; set; }
        /// <summary>
        /// 库存数
        /// </summary>
        [Display(Name = "库存数")]
        public int Inventory { get; set; }

        [Display(Name = "是否禁用")]
        public bool BeLock { get; set; }

        [Display(Name = "备注")]
        public string Remark { get; set; }

        [Display(Name = "物品类别编号")]
        public int OffGoodsClassID { get; set; }

        [ForeignKey("OffGoodsClassID")]
        public virtual OffGoodsClass OffGoodsClass { get; set; }
    }
}
